

using System;
using System.Collections.Generic;
using System.Text;

namespace JTC.MiniCommerce.Store {

  public partial class AttributeCollection {
    
    #region Methods
    
    #region Public

    /// <summary>
    /// Returns a <see cref="T:System.String"></see> that represents the current <see cref="T:System.Object"></see>.
    /// </summary>
    /// <returns>
    /// A <see cref="T:System.String"></see> that represents the current <see cref="T:System.Object"></see>.
    /// </returns>
    public override string ToString() {
      string toString = string.Empty;
      foreach (Attribute attribute in this) {
        toString += attribute.Name + ":";
        foreach (AttributeItem item in attribute.AttributeItemCollection) {
          toString += item.Name + " ";
        }
      }
      return toString;
    }
    
    #endregion
    
    #endregion
    
  }

  public partial class Attribute {
  
    #region Member Variables

    private AttributeItemCollection _attributeItemCollection = new AttributeItemCollection();
    
    #endregion
    
    #region Properties

    /// <summary>
    /// Gets or sets the attribute item collection.
    /// </summary>
    /// <value>The attribute item collection.</value>
    public AttributeItemCollection AttributeItemCollection {
      get {
        return _attributeItemCollection;
      }
      set {
        _attributeItemCollection = value;
      }
    }
    
    #endregion
    
  }
}
